#include <ros/ros.h>
#include <std_msgs/Float32.h>   //ROS自带的浮点类型，类似 float，但是不同
#include <rosSerial/ptz.h>


int main(int argc,char** argv)
{
   ros::init(argc,argv,"ptz_talker");  
   ros::NodeHandle n;
   ros::Publisher  pub = n.advertise<rosSerial::ptz>("cmd_ptz",20);
   rosSerial::ptz ptz_msg;                
   ros::Rate loop_rate(100);//设置周期休眠时间
   while(ros::ok())
   {

   		ptz_msg.PtzTurn += 5;
   		ptz_msg.PtzPitch -=5;
   		pub.publish(ptz_msg);  
   		ROS_INFO("Send PTZ CMD\n"); 

   		ros::spinOnce();//周期执行
        loop_rate.sleep();//周期休眠
   }
   return 0;
}